A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to the field of object-oriented computer programs and in particular to a method for generating a snapshot of an operating system environment for use in comparing System States at different points in time.
With increasing complexity of administering computer systems today, it would be desirable to detect changes in System State of such a complex computer system over a period of time. xe2x80x9cSystem Statexe2x80x9d is defined as a run-time state of a system""s components at a particular instant in time.
The components of a computer system that may be of interest at run-time are its hardware, file systems, processes running on the system and its registry. The term hardware of a computer system refers to objects that can be actually touched like disks, disk drives, display screens, keyboards, printers, boards, and chips. In contrast software is untouchable. Software exists as ideas, concepts, and symbols but has no substance. File system refers to a system that an operating system or a program uses to organize and keep track of files. For example, a hierarchical file system is one that uses directories to organize files into a tree structure. A process is a program being executed by a computer system and the term is used loosely as a synonym for task hereinbelow. A process performs some useful operations on data. Typically, an operating system is capable of running several processes at the same time. Hence, at any given time there could be one or more processes running on a computer system. A registry is a database used by the Windows (also Windows NT) operating system to store configuration information. The Registry consists of the following major sections:
HKEY_Classes_Rootxe2x80x94file associations and OLE information
HKEY_Current _Userxe2x80x94all preferences set for current user
HKEY_Userxe2x80x94all the current user information for each user of the system
HKEY_Local_Machinexe2x80x94settings for hardware, operating system, and installed applications
HKEY_Current_Configurationxe2x80x94settings for the display and printers
Most Windows applications write data to the Registry, at least during installation. A registry can be edited directly by using the Registry Editor provided with the operating system. However, great care must be taken during editing the Registry because errors in the Registry could disable a computer system.
Changes to any of these components can result in a change in System State.
As the Windows NT operating system is increasingly becoming an enterprise wide operating system a larger number of system administrators need methods that can help them diagnose and solve problems in a shorter period of time. In particular, there is a need for a method that could compare and contrast System States of a single server before and after a program installation or execution. Such a program installation could potentially affect one or more of the components of a system depending on the nature of the particular program being executed or installed. The prior art technique is limited to the extent that it allows monitoring of the current state of the system components, but provides no method for readily comparing and contrasting the current state of the system with a previously recorded state.
The prior art is also limited because it does not allow a comparison of a multitude of different systems. This capability would be useful in a scenario where the user, who typically is a person responsible for maintaining redundant, mirrored or backup machines, would be trying to determine if two setups on two different machines were performed correctly or consistently.
Another limitation of the prior art techniques is that it does not provide a method for detecting if hardware, for example the disk drives, processors, memory, or printers, failed or went off-line between uses or re-boots. Such a capability would enable a system administrator to trouble-shoot a problem with a hardware device failure occurring in conjunction with a system outage.
Still another limitation with the prior art is that it does not provide a method for detecting changes to a file system over time. Such a capability would be helpful in maintaining directories by checking for the creation of certain files and by comparing and contrasting the file sizes created at different points in time, which could help in dynamically limiting file size in order to conserve disk space.
The prior art is also limited by the fact that there is no method to compare and contrast the complete system registry from different points in time in order to identify those areas of the registry that have changed over time. These and other limitations of the prior art have been addressed by the method of the present invention.
It is therefore an object of this invention to provide a method for comparing and contrasting System States from different points in time in order for a user to diagnose and solve complex system administration problems in a time span shorter than that provided with the prior art techniques. Users of an embodiment of the present invention would be typically computer technology administrators, researchers, or developers who would be interested in comparing the states of the components of a computer system at different points in time. By using this invention they will be able to diagnose system problems more efficiently, both in terms of speed and accuracy. This would result in overall cost reductions in operating and maintaining a computer system as well as higher availability levels of its critical components.
An object of this invention is to provide a method for comparing and contrasting System States of multiple, or different computer systems so that system administrators who are trying to maintain redundant, mirrored, or backup machines can determine accurately if any two setups were performed correctly and consistently.
Another object of this invention is to provide a method for determining whether or not certain pieces of hardware, such as disk drives, processors, memory or printers, fail or go off line between uses or boots.
Still another object of this invention is to provide a method for comparing the file system at different points in time in order to maintain files of the right size and number.
Yet another object of this invention is to provide a method for comparing and contrasting the complete system registry at different points in time in order to identify any changes.
An advantage of this invention is that it allows the user to determine if a particular program or service is running or not running when compared to a previous point in time. This would be useful in a situation where a potentially bigger and more observable problem is the result of a program or service running on the system, and the system administrator needs to trouble-shoot the system to find out if that program or service is currently running on the system. The administrator can use the method of this invention to compare all the programs that are currently running to all the programs that were running in a previously recorded xe2x80x9chealthyxe2x80x9d state and determine the difference in the number and type of programs running at the two points in time.
A feature of this invention is that it provides a scriptable interface, which means it can be used to record System States at different points in time even in the physical absence of the user. By simply using scripts, the method of this invention can be used to provide an update of all the system components at fixed intervals of time.
These and other objects, which will become apparent as the invention is described in detail below, where in a computer system having a memory and an operating system persistently stored in a storage device, a method is disclosed for comparing System States of the system from time to time. The method includes creating a snapshot object for interfacing with functionalities of the system; and using the snapshot object, creating a first collection of System State objects which record the status of the system at a given instant in time. Next, the first collection of System State objects is stored in the memory. A second collection of System State objects, which was previously created and stored in the storage device, is then loaded into the memory. A comparison of the first collection with the second collection is made and an indicia of any differences therebetween is provided.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.